<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>EventConfig 构造函数</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="eventconfig.avoidmethod.html">« EventConfig::avoidMethod</a></li>
      <li style="float: right;"><a href="eventconfig.requirefeatures.html">EventConfig::requireFeatures »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.eventconfig.html">EventConfig</a></li>
    <li>EventConfig 构造函数</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="eventconfig.construct" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">EventConfig::__construct</h1>
  <p class="verinfo">(PECL event &gt;= 1.2.6-beta)</p><p class="refpurpose"><span class="refname">EventConfig::__construct</span> &mdash; <span class="dc-title">EventConfig 构造函数</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-eventconfig.construct-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="methodname"><strong>EventConfig::__construct</strong></span>()</div>

  <p class="para rdfs-comment">
   构造 EventConfig 对象，可传递给 <span class="methodname"><a href="eventbase.construct.html" class="methodname">EventBase::__construct()</a></span> 构造函数。
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-eventconfig.construct-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-eventconfig.construct-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   返回 <span class="classname"><a href="class.eventconfig.html" class="classname">EventConfig</a></span> 对象。
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-eventconfig.construct-examples">
  <h3 class="title">范例</h3>
  <div class="example" id="example-4246">
   <p><strong>示例 #1 
    <span class="function"><strong>EventConfig::__construct()</strong></span> 示例 </strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;避免&nbsp;"select"&nbsp;方法<br /></span><span style="color: #0000BB">$cfg&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">EventConfig</span><span style="color: #007700">();<br />if&nbsp;(</span><span style="color: #0000BB">$cfg</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">avoidMethod</span><span style="color: #007700">(</span><span style="color: #DD0000">"select"</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"'select'&nbsp;方法失效\n"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #FF8000">//&nbsp;创建跟&nbsp;config&nbsp;相关的&nbsp;event_base<br /></span><span style="color: #0000BB">$base&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">EventBase</span><span style="color: #007700">(</span><span style="color: #0000BB">$cfg</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;现在&nbsp;$base&nbsp;配置为避免&nbsp;select&nbsp;后端(方法)&nbsp;*/<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

  </div>
 </div>

 <div class="refsect1 seealso" id="refsect1-eventconfig.construct-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member">
    <span class="methodname"><a href="eventbase.construct.html" class="methodname" rel="rdfs-seeAlso">EventBase::__construct()</a> - 构造 EventBase 对象</span>
   </li>
  </ul>
 </div>

</div></div></div></body></html>